/*    */ package com.lmpop.trade.util;
/*    */ 
/*    */ import com.lmpop.trade.ti_filter.Ti_filterInfo;
/*    */ import java.util.Iterator;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class FilterSensitiveWordsUtil
/*    */ {
/*    */   public static String doFilter(String originalStr)
/*    */   {
/* 21 */     List list = getSensitiveWords();
/*    */ 
/* 23 */     if ((list != null) && (list.size() > 0)) {
/* 24 */       Iterator it = list.iterator();
/* 25 */       while (it.hasNext()) {
/* 26 */         Map map = (Map)it.next();
/* 27 */         originalStr = originalStr.replaceAll(map.get("name").toString(), map.get("value").toString());
/*    */       }
/*    */     }
/*    */ 
/* 31 */     return originalStr;
/*    */   }
/*    */ 
/*    */   public static List getSensitiveWords()
/*    */   {
/* 39 */     Ti_filterInfo ti_filterInfo = new Ti_filterInfo();
/* 40 */     List list = ti_filterInfo.getAllFilter();
/* 41 */     return list;
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.util.FilterSensitiveWordsUtil
 * JD-Core Version:    0.6.0
 */